package com.xyd.contoller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController // 它的源注解包含了@Controller和@ResponseBody
@Slf4j
@RequestMapping("/user") // 通常为了模块的划分
public class HelloController {
    @RequestMapping(name = "hello",path = "hello", method = RequestMethod.GET)
    public String hello() {
        log.info("Hello Controller execute...");
        return "hello.html";
    }
}
